package com.scuec.groupfive.mapper;

import com.scuec.groupfive.entity.UserAccountAge;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserAccountAgeMapper {
    @Select("SELECT user_id, username, DATEDIFF(CURRENT_DATE(), created_at) AS account_age_days " +
            "FROM users WHERE user_id = #{userId}")
    UserAccountAge getUserAccountAge(Integer userId);
}